package org.jproxy.classloader;

import java.util.ArrayList;
import java.util.List;

class FakeClassLoader extends ClassLoader
{
	private final List<Class<?>> classList;

	FakeClassLoader(ClassLoader parentClassLoader)
	{
		super(parentClassLoader);
		classList = new ArrayList<Class<?>>();
	}

	@Override
	public Class<?> loadClass(String arg0) throws ClassNotFoundException
	{
		Class<?> clazz = super.loadClass(arg0);
		classList.add(clazz);
		return clazz;
	}

	final List<Class<?>> getClassList()
	{
		return classList;
	}
}
